﻿using System.Data;
using System.Text;

namespace SqlExecHelper
{
    public interface IBatchQuery : IBatchSql, System.IDisposable
    {
        T[] GroupColumn<T>(string group, ISqlWhere[] having, params ISqlWhere[] where);
        T[] GroupColumn<T>(string group, params ISqlWhere[] where);
        T[] GroupColumn<T>(string group, int index, int size, out long count, params ISqlWhere[] where);
        T ExecuteScalar<T>(string column, SqlFuncType funcType, params ISqlWhere[] where);
        T ExecuteScalar<T>(string column, string funcType, params ISqlWhere[] where);
        StringBuilder GenerateSql(out IDataParameter[] param);
        T Group<T>(string group, ISqlWhere[] having, params ISqlWhere[] where);
        T[] GroupTable<T>(string group, ISqlWhere[] having, params ISqlWhere[] where);
        T Group<T>(string group, params ISqlWhere[] where);
        T[] GroupTable<T>(string group, params ISqlWhere[] where);
        T[] GroupTable<T>(string group, string orderBy, ISqlWhere[] having, params ISqlWhere[] where);
        T[] GroupTable<T>(string group, string sortBy, params ISqlWhere[] where);
        T[] GroupTable<T>(string[] groups, ISqlWhere[] having, params ISqlWhere[] where);
        T Group<T>(string[] group, params ISqlWhere[] where);
        T[] GroupTable<T>(string[] group, params ISqlWhere[] where);
        T[] GroupTable<T>(string[] groups, string orderBy, ISqlWhere[] having, params ISqlWhere[] where);
        T[] GroupTable<T>(string[] group, string sortBy, params ISqlWhere[] where);
        T[] Query<T>(params ISqlWhere[] where);
        T[] Query<T>(string column, params ISqlWhere[] where);
        T[] QueryByPaging<T>(string orderBy, int index, int size, out long count, params ISqlWhere[] where);
        T[] QueryByPaging<T>(string orderBy, int index, int size, params ISqlWhere[] where);
        T[] QueryBySort<T>(string orderBy, params ISqlWhere[] where);
        T[] QueryByTop<T>(int topNum, params ISqlWhere[] where);
        T[] QueryByTop<T>(int topNum, string orderBy, params ISqlWhere[] where);
    }
}